<template>
<view class="news">
	<uni-card v-for="item in newlist" :key="item.id" :cover="item.cover" @click='goto(item.id)'>
		
			<view class="txt">
				<text class="left">{{item.title}}</text>
				<text class="rig">{{item.createTime}}</text>
			</view>
			
	</uni-card>
	
</view>
</template>

<script setup>
import {defineProps,defineEmits} from 'vue'

//自定义数据接受
const props = defineProps({
	newlist:{
		type:Array
	}
})
//自定义事件接受
const  emit =defineEmits(['setgo'])
	
const goto=(e)=>{
	emit('setgo',e)
}
	
</script>
<style lang="scss">
	.news{
	
	 .uni-card{

		.txt{
		 overflow: hidden;
		 
		 .rig{
		  float: right; 
		  margin-right: 10px;
		 }
		
		  
	    }
		 
	 }
		
		
	}

</style>